#include<stdio.h>

#define ONE_FLAG   1<<0  //0000 0000 ... 0000 0001
#define TWO_FLAG   1<<1  //0000 0000 ... 0000 0010
#define THREE_FLAG 1<<2  //0000 0000 ... 0000 0100
#define FOUR_FLAG  1<<3  //0000 0000 ... 0000 1000

void fun(int flags)
{
    if(flags & ONE_FLAG)   printf("one\n");
    if(flags & TWO_FLAG)   printf("two\n");
    if(flags & THREE_FLAG) printf("three\n");
    if(flags & FOUR_FLAG)  printf("four\n");
}

int main()
{
    fun(ONE_FLAG); printf("\n");
    fun(ONE_FLAG | TWO_FLAG); printf("\n");
    fun(ONE_FLAG | TWO_FLAG | THREE_FLAG); printf("\n");
    fun(ONE_FLAG | TWO_FLAG | THREE_FLAG | FOUR_FLAG); printf("\n");

    return 0;
}
